<template>
	<view class="app">
		<view class="logo">
			<image :src="logoUrl" mode="widthFix" style="width: 100%;"></image>
		</view>
		<view class="btn-list">
			<view class="btn-item" @click="gotoPage('/pageA/common/document?type=useragreement')">
				<view class="btn-text">
					用户协议
				</view>
				<view class="btn-icon">
					<u-icon name="arrow-right" :size="28" color="#999"></u-icon>
				</view>
			</view>
			<view class="btn-item" @click="gotoPage('/pageA/common/document?type=privacypolicy')">
				<view class="btn-text">
					隐私政策
				</view>
				<view class="btn-icon">
					<u-icon name="arrow-right" :size="28" color="#999"></u-icon>
				</view>
			</view>

			<view class="btn-item" @click="phone(4008858872)">
				<view class="btn-text">
					加盟热线: 400-8858-872
				</view>
				<view class="btn-icon">
					<u-icon name="arrow-right" :size="28" color="#999"></u-icon>
				</view>
			</view>
			<view class="btn-item" style="border-bottom: 0;">
				<view class="btn-text">
					版本号: v{{version}}
				</view>
				<view class="btn-icon">
					
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				logoUrl:"/static/images/logo.png",
				version:'1.0.0'
			}
		},
		methods:{
			phone(phone){
				uni.makePhoneCall({
					phoneNumber:phone.toString(),
					success(res) {
					},
					fail(req) {
					}
				})
			},
			gotoPage(path){
				uni.navigateTo({ url: path });
			},
		},
		onLoad() {
			// #ifdef MP-WEIXIN
			const accountInfo = uni.getAccountInfoSync();
			console.log(accountInfo,'版本信息')
			this.version = accountInfo.miniProgram.version 
			// #endif
		},
		onShow() {  
			
		},
	}
</script>

<style scoped>
	.logo{width: 300rpx;height: 300rpx;margin:auto; padding-top: 120rpx;}
	.btn-list{padding: 100rpx 0;}
	.btn-item{display: flex;justify-content: space-between;align-items: center;padding: 30rpx 40rpx;border-bottom: 1rpx solid #eee; background: #fff;}
	.btn-text{font-family: PingFang SC, PingFang SC;font-weight: bold;font-size: 28rpx;color: #333333;text-align: left;font-style: normal;text-transform: none;}
</style>